<?php
   session_start();
$arr = $_SESSION['name'];
   $sql="SELECT touxiang_img FROM tbl_user WHERE name='$arr'";
   $link = mysqli_connect("127.0.0.1","root","","news");
   mysqli_set_charset($link, "utf8");
   $res=mysqli_query($link, $sql);
   $arr=array();
   if(mysqli_num_rows($res)>0){
		while($raw = mysqli_fetch_assoc($res)){
                $results[]=$raw;
			echo json_encode($results);
		}
		
	}
?>